package com.sunyard.manage.service;

import com.sunyard.dal.bo.*;
import com.sunyard.dal.bo.role.*;
import com.sunyard.dal.dto.RoleDTO;
import com.sunyard.dal.entity.Role;
import com.sunyard.utils.Response.BaseResult;
import com.sunyard.utils.Response.GetResult;
import com.sunyard.utils.manage.DataGrid;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author jiy.fang
 * @ClassName RoleService
 * @Description description
 * @date 2019/7/24 19:26
 */
public interface RoleService {

    //分页查询角色信息
    BaseResult<DataGrid<RoleDTO>> queryRoleByPage(HttpServletRequest request, PaginationBO<RoleQueryBO> queryBO) throws Exception;

    //添加角色信息
    BaseResult insertRole(HttpServletRequest request, RoleAddBO roleAddBO) throws Exception;

    //修改角色信息
    BaseResult<GetResult> updateRole(HttpServletRequest request, RoleUpdateBO updateBO) throws Exception;

    //删除角色信息
    BaseResult deleteRole(HttpServletRequest request, RoleDeleteBO roleDeleteBO) throws Exception;

    List<Role> getRoleLists(HttpServletRequest request) throws Exception;

    List<RoleDTO> getListRoleExport(HttpServletRequest request, RoleQueryBO roleQueryBO);

    BaseResult batchDeleteRole(HttpServletRequest request, RoleDeleteBO roleDeleteBO) throws Exception;

    void configRolePopedom(String auditType, RolePopedomConfigBO configBO, String auditId) ;

    /**
     * 查询开锁权限列表(排除超级管理员)
     * @author wp
     * @date 2022/10/12
     * @param popedomId
     * @param request
     * @return java.util.List<com.sunyard.dal.entity.Role>
     * @throws
    */
    List<Role> getOpenLockRoles(String popedomId, HttpServletRequest request);
}
